﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Fdd.Aspen.Services.Web;
using Fdd.Aspen.DomainModel.Repositories;
using Fdd.Aspen.Test.Infrastructure.Repositories;
using Fdd.Aspen.DomainModel.Entities;
using Fdd.Aspen.DomainModel.Repositories.Interfaces;


namespace Fdd.Aspen.Test
{
    [TestClass]
    public class MemberDomainServiceTest
    {
        [ClassInitialize]
        public static void ClassInit(TestContext context)
        {
        }

        
        [TestMethod]
        public void CreateMemberDomainService()
        {
            IMemberRepository memberRepository = new TestMemberRepository();
            IGatheringRepository gatheringRepository = new TestGatheringRepository();
            MemberDomainService memberService = new MemberDomainService(memberRepository, gatheringRepository);
        }

        [TestMethod]
        public void GetAllMembers()
        {
            IMemberRepository memberRepository = new TestMemberRepository();
            IGatheringRepository gatheringRepository = new TestGatheringRepository();
            MemberDomainService memberService = new MemberDomainService(memberRepository, gatheringRepository);

            var members = memberService.GetMembers();

            Assert.AreEqual<int>(3, members.Count());
        }

    }
}
